<template>
  <div>
    <div class="yd-ls-button-box">
      <button
        @click="handleButton"
        class="yd-btn-block"
        :class="classname"
        style="border-radius: 0px"
        :style="{'color': txtc}">
        {{ btnname }}
      </button>
    </div>
  </div>

</template>

<style>

  .yd-ls-button-box {
    width: 100%;
    height: .9rem;
    position: fixed;
    bottom: 0;
    z-index: 10;
  }
  .yd-ls-button-box .yd-btn-block {
    margin-top: 0;
  }
</style>
<script>
    export default {
        name: '',
        props: {
          type: {
            type: String,
            default: 'blue'
          },
          txtc: {
            type: String,
            default: '#fff'
          },
          btnname: String
        },
        data() {
            return {
                classname: '',
                txtcolor: ''
            }
        },
        methods: {
          init () {
            this.classname = `yd-btn-${this.type}`
            this.txtcolor = this.txtc
          },
          handleButton () {
            this.$emit('handle-button')
          }
        },
        mounted() {
          this.init()
        },
        components: {}


    }
</script>
